package com.example.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.web.entity.Order;
import com.example.web.service.OrderService;

@RestController
public class OrderController {

	@Autowired
	OrderService  orderService ;
	
	@GetMapping("/saveOrder")
	public String save() {
		Order order = new Order();
		order.setId(1);
		order.setName("xxx");
		orderService.save(order);
		return "papapa";
	}
}
